<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Title</title>
</head>
<body>
    <span th:text="23">尚学堂</span><br>
    <span th:text="${msg}">你好吗</span><br>

    <input type="text" th:value="${msg}" value="nihao">
    <hr/>
    <span th:text="${#strings.isEmpty(msg)}"></span>
    <hr/>
    <span th:text="${#strings.contains(msg,'me')}"></span>
    <hr/>
    <span th:text="${#strings.length(msg)}"></span>
<hr/>
<hr/>
    <span th:text="${#dates.format(date)}"></span>>
<hr/>
    <span th:text="${#dates.format(date,'yyyy/MM/dd')}"></span>
<hr/>
    <span th:text="${#dates.year(date)}"></span>
    <span th:text="${#dates.month(date)}"></span>
    <span th:text="${#dates.day(date)}"></span>
<hr/>
    <div>
        <h3 th:if="${sex} == '男'">
            性别：男
        </h3>
        <span th:if="${sex} == '男'">男男</span>
        <h3 th:if="${sex} == '女'">
            性别：女
        </h3>
    </div>
<hr/>
    <div th:switch="${id}">
<!--        <span th:case=1>ID为1</span> 和下面的效果一样 -->
        <span th:case="1">ID为1</span>
        <span th:case="2">ID为2</span>
        <span th:case="3">ID为3</span>
        <span th:case="*">ID为空</span>
    </div>

<hr/>
    <p>List</p>
    <table border="1" width="50%">
        <tr>
            <th>ED</th>
            <th>Name</th>
            <th>Age</th>
            <th>Index</th>
            <th>Count</th>
            <th>Size</th>
            <th>Odd</th>
            <th>Even</th>
            <th>First</th>
            <th>Last</th>
            <th>Current</th>
        </tr>
        <tr th:each="u ,var : ${list}">
            <td th:text="${u.id}"></td>
            <td th:text="${u.name}"></td>
            <!--<td th:text="${u.getAge()}"></td>-->
            <td th:text="${u.age}"></td>
            <td th:text="${var.index}"></td>
            <td th:text="${var.count}"></td>
            <td th:text="${var.size}"></td>
            <td th:text="${var.odd}"></td>
            <td th:text="${var.even}"></td>
            <td th:text="${var.first}"></td>
            <td th:text="${var.last}"></td>
            <td th:text="${var.current}"></td>
        </tr>
    </table>


    <hr/>
    <p>Mao</p>
    <table border="1" width="50%">
        <tr>
            <th>Value</th>
        </tr>
        <tr th:each="m : ${map}">
            <td th:text="${m}"></td>
        </tr>
    </table>

    <hr/>
    <p>Map</p>
    <table border="1" width="50%">
        <tr>
            <th>ED</th>
            <th>Name</th>
            <th>Age</th>
        </tr>
        <tr th:each="m ,var : ${map}">
            <td th:text="${m.value.id}"></td>
            <td th:text="${m.value.name}"></td>
            <!--<td th:text="${u.getAge()}"></td>-->
            <td th:text="${m.value.age}"></td>
        </tr>
    </table>
</body>
</html>